home *** CD-ROM | disk | FTP | other *** search
- >Now if someone could shed light on how to use the mysterious Hardcol
- >and Set HardCol commands, I'd name my first-born after them. :-)
-
- Hey, I'm perfectly willing to help - you don't need to bribe me. :-)
-
- As I understand it (I've never actually used the instructions),
- Set Hardcol's two parameters work like this: the first controls which
- odd-numbered sprites are considered in the collision detection, and the
- second is simply a pen number in the background to check. Normally,
- hardware collision detection will only look at even-numbered sprites,
- but by setting bits in the first parameter, you can let odd-numbered
- sprites be considered also:
-
- Bit # Sprite #
- ----- --------
- 0 1
- 1 3
- 2 5
- 3 7
-
- The only problem with this is that there's no way to tell whether an
- even-numbered sprite or its odd-numbered partner were involved in a
- collision, so odd-numbered sprite collisions are of limited use.
-
- The =Hardcol function returns whether a collision has been detected.
- You can then use the =Col function to determine which sprite was
- involved in the collision. If the collision occurred between a sprite
- and the background, everything's fine; but if the collision was between
- two sprites, you may or may not find out both of the sprite numbers - I
- don't know, having never tried.
-
- Is that explanation enough? Or have I been completely
- incomprehensible? :-)
-
- --Andy Church
-
-